Integrand size = 24, antiderivative size = 362 \[ \int \frac {d+e x^n}{\left (a+b x^n+c x^{2 n}\right )^2} \, dx=\frac {x \left (b^2 d-2 a c d-a b e+c (b d-2 a e) x^n\right )}{a \left (b^2-4 a c\right ) n \left (a+b x^n+c x^{2 n}\right )}-\frac {c \left (2 a \left (2 c d (1-2 n)+\sqrt {b^2-4 a c} e (1-n)\right )-b^2 (d-d n)-b \left (\sqrt {b^2-4 a c} d (1-n)-2 a e n\right )\right ) x \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{a \left (b^2-4 a c\right ) \left (b^2-4 a c-b \sqrt {b^2-4 a c}\right ) n}-\frac {c \left (2 a \left (c d (2-4 n)-\sqrt {b^2-4 a c} e (1-n)\right )-b^2 d (1-n)+b \left (\sqrt {b^2-4 a c} d (1-n)+2 a e n\right )\right ) x \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{a \left (b^2-4 a c\right ) \left (b^2-4 a c+b \sqrt {b^2-4 a c}\right ) n} \]
[Out]
Time = 0.38 (sec) , antiderivative size = 328, normalized size of antiderivative = 0.91, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {1444, 1436, 251} \[ \int \frac {d+e x^n}{\left (a+b x^n+c x^{2 n}\right )^2} \, dx=-\frac {c x \left (-(1-n) \sqrt {b^2-4 a c} (b d-2 a e)+2 a b e n+2 a c d (2-4 n)+b^2 (-d) (1-n)\right ) \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{a n \left (b^2-4 a c\right ) \left (-b \sqrt {b^2-4 a c}-4 a c+b^2\right )}-\frac {c x \left ((1-n) \sqrt {b^2-4 a c} (b d-2 a e)+2 a b e n+4 a c d (1-2 n)+b^2 (-d) (1-n)\right ) \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{a n \left (b^2-4 a c\right ) \left (b \sqrt {b^2-4 a c}-4 a c+b^2\right )}+\frac {x \left (c x^n (b d-2 a e)-a b e-2 a c d+b^2 d\right )}{a n \left (b^2-4 a c\right ) \left (a+b x^n+c x^{2 n}\right )} \]
[In]
[Out]
Rule 251
Rule 1436
Rule 1444
Rubi steps \begin{align*} \text {integral}& = \frac {x \left (b^2 d-2 a c d-a b e+c (b d-2 a e) x^n\right )}{a \left (b^2-4 a c\right ) n \left (a+b x^n+c x^{2 n}\right )}-\frac {\int \frac {-a b e-2 a c d (1-2 n)+b^2 (d-d n)+c (b d-2 a e) (1-n) x^n}{a+b x^n+c x^{2 n}} \, dx}{a \left (b^2-4 a c\right ) n} \\ & = \frac {x \left (b^2 d-2 a c d-a b e+c (b d-2 a e) x^n\right )}{a \left (b^2-4 a c\right ) n \left (a+b x^n+c x^{2 n}\right )}-\frac {\left (c \left (2 a c d (2-4 n)-b^2 d (1-n)+\sqrt {b^2-4 a c} (b d-2 a e) (1-n)+2 a b e n\right )\right ) \int \frac {1}{\frac {b}{2}+\frac {1}{2} \sqrt {b^2-4 a c}+c x^n} \, dx}{2 a \left (b^2-4 a c\right )^{3/2} n}-\frac {\left (c \left ((b d-2 a e) (1-n)-\frac {4 a c d (1-2 n)+2 a b e n-b^2 (d-d n)}{\sqrt {b^2-4 a c}}\right )\right ) \int \frac {1}{\frac {b}{2}-\frac {1}{2} \sqrt {b^2-4 a c}+c x^n} \, dx}{2 a \left (b^2-4 a c\right ) n} \\ & = \frac {x \left (b^2 d-2 a c d-a b e+c (b d-2 a e) x^n\right )}{a \left (b^2-4 a c\right ) n \left (a+b x^n+c x^{2 n}\right )}-\frac {c \left ((b d-2 a e) (1-n)-\frac {4 a c d (1-2 n)+2 a b e n-b^2 (d-d n)}{\sqrt {b^2-4 a c}}\right ) x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{a \left (b^2-4 a c\right ) \left (b-\sqrt {b^2-4 a c}\right ) n}-\frac {c \left (2 a c d (2-4 n)-b^2 d (1-n)+\sqrt {b^2-4 a c} (b d-2 a e) (1-n)+2 a b e n\right ) x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{a \left (b^2-4 a c\right )^{3/2} \left (b+\sqrt {b^2-4 a c}\right ) n} \\ \end{align*}
Time = 4.18 (sec) , antiderivative size = 603, normalized size of antiderivative = 1.67 \[ \int \frac {d+e x^n}{\left (a+b x^n+c x^{2 n}\right )^2} \, dx=\frac {c x \left (\frac {4 \left (b^2-4 a c\right ) \left (b^2 d (-1+n) x^n \left (b+c x^n\right )-2 a^2 c \left (2 d n+e x^n\right )+a \left (-2 c^2 d (-1+2 n) x^{2 n}+b c x^n \left (3 d-4 d n+e x^n\right )+b^2 \left (d n+e x^n\right )\right )\right )}{\left (b^2-4 a c-b \sqrt {b^2-4 a c}\right ) \left (b^2-4 a c+b \sqrt {b^2-4 a c}\right ) \left (a+x^n \left (b+c x^n\right )\right )}+\frac {2^{-1/n} \left (4 a c \left (\sqrt {b^2-4 a c} d (1-2 n)+2 a e (-1+n)\right )+b^3 d (-1+n)+b^2 \left (\sqrt {b^2-4 a c} d-2 a e\right ) (-1+n)+2 a b \left (-2 c d (-1+n)+\sqrt {b^2-4 a c} e n\right )\right ) \left (\frac {c x^n}{b-\sqrt {b^2-4 a c}+2 c x^n}\right )^{-1/n} \operatorname {Hypergeometric2F1}\left (-\frac {1}{n},-\frac {1}{n},\frac {-1+n}{n},\frac {b-\sqrt {b^2-4 a c}}{b-\sqrt {b^2-4 a c}+2 c x^n}\right )}{\sqrt {b^2-4 a c} \left (-b^2+4 a c+b \sqrt {b^2-4 a c}\right )}+\frac {2^{-1/n} \left (b \sqrt {b^2-4 a c} d (-1+n)-2 a \sqrt {b^2-4 a c} e (-1+n)-2 a b e n+4 a c d (-1+2 n)+b^2 (d-d n)\right ) \left (\frac {c x^n}{b+\sqrt {b^2-4 a c}+2 c x^n}\right )^{-1/n} \operatorname {Hypergeometric2F1}\left (-\frac {1}{n},-\frac {1}{n},\frac {-1+n}{n},\frac {b+\sqrt {b^2-4 a c}}{b+\sqrt {b^2-4 a c}+2 c x^n}\right )}{\sqrt {b^2-4 a c} \left (b+\sqrt {b^2-4 a c}\right )}\right )}{a \left (-b^2+4 a c\right ) n} \]
[In]
[Out]
\[\int \frac {d +e \,x^{n}}{\left (a +b \,x^{n}+c \,x^{2 n}\right )^{2}}d x\]
[In]
[Out]
\[ \int \frac {d+e x^n}{\left (a+b x^n+c x^{2 n}\right )^2} \, dx=\int { \frac {e x^{n} + d}{{\left (c x^{2 \, n} + b x^{n} + a\right )}^{2}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {d+e x^n}{\left (a+b x^n+c x^{2 n}\right )^2} \, dx=\text {Timed out} \]
[In]
[Out]
\[ \int \frac {d+e x^n}{\left (a+b x^n+c x^{2 n}\right )^2} \, dx=\int { \frac {e x^{n} + d}{{\left (c x^{2 \, n} + b x^{n} + a\right )}^{2}} \,d x } \]
[In]
[Out]
\[ \int \frac {d+e x^n}{\left (a+b x^n+c x^{2 n}\right )^2} \, dx=\int { \frac {e x^{n} + d}{{\left (c x^{2 \, n} + b x^{n} + a\right )}^{2}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {d+e x^n}{\left (a+b x^n+c x^{2 n}\right )^2} \, dx=\int \frac {d+e\,x^n}{{\left (a+b\,x^n+c\,x^{2\,n}\right )}^2} \,d x \]
[In]
[Out]